<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>用户列表</title>
   <link href="../css/themes/default/easyui.css" rel="stylesheet" />
   <link href="../css/themes/icon.css" rel="stylesheet" />
   <link href="../css/themes/color.css" rel="stylesheet" />
   <script src="../script/jquery.min.js"></script>
   <script src="../script/jquery.easyui.min.js"></script>
   <script src="../script/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript">
        $(function () {
            loadData();
            $("#btnSerach").click(function () {
                var pars = {
                    CreationTime:$("#CreationTime").val(),
                    EndCreationTime: $("#EndTime").val(),
                    ReceiveName: $("#ReceiveName").val(),
                    ReplaceUser: $("#ReplaceUser").val(),
                    FedexNo: $("#FedexNo").val(),
                    Name: $("#Name").val(),
                    FedexSatu:$("#FedexSatu").val(),
                    FedexType: $("FedexType").val(),
                    FedexArea: $("#FedexArea").val(),
                    FedexArea1: $("#FedexArea1").val()                    
                };
                loadData(pars);
            });
        });
        function loadData(pars) {
            $('#date').datagrid({
                url: '127.0.0.1:8080/libManager/user/find',
                //width: 1000,
                //height: 400,
                width: ($(window).width()*0.90), 
                height:($(window).height()*0.99)-100, 
                //fit:true,
                fitColumns: true, //列自适应
                nowrap: false,
                idField: 'Id',//主键列的列名
                loadMsg: '正在加载信息...',
                pagination: true,//是否有分页
                //singleSelect: false,//是否单行选择
                pageSize: 10,//每页多少条数据
                pageNumber: 1,//默认的页
                pageList: [10, 20, 30],
                queryParams: pars,//往后台传递参数
                columns: [[
                    {
                        field: 'id', title: '账号', width: 100, align: 'center'
                    },
                    { field: 'name', title: '姓名', align: 'center', width: 100 },
                     { field: 'sex', title: '性别', align: 'center', width: 100 },
                      { field: 'type', title: '职位', align: 'center', width: 100 },
                      { field: 'birth', title: '生日', align: 'center', width: 100,
					  formatter: function (value, row, index) {
					      return (eval(value.replace(/\/Date\((\d+)\)\//gi, "new Date($1)"))).pattern("yyyy-M-d");
					  }},
                      { field: 'phoneNumber', title: '电话号码', align: 'center', width: 100 },
					  { field: 'idCard', title: '身份证号码', align: 'center', width: 100 },
					  { field: 'address', title: '住址', align: 'center', width: 100 },
                      {
                          field: 'operation', title: '操作', align: 'center', width: 100,
                          formatter: function (value, row, index) {
                              var str = "";
                              str += '<a href="javascript:update(\'' + Id + '\')" class="easyui-linkbutton c1" style="width:50px">修改</a>';                              
                              str += '<a href="javascript:view(\'' + Id + '\');" class="easyui-linkbutton c4" tyle="width:50px" >查看</a>';
                              str += '<a href="javascript:view(\'' + Id + '\');" class="easyui-linkbutton c5" tyle="width:50px">隐藏</a>';
                              return str;
                          }
                      }
                ]],
                //toolbar: [{
                //    id: 'btnAdd',
                //    text: '添加',
                //    iconCls: 'icon-add',
                //    handler: function () {

                //    }
                //}],
            });
        }
    </script>
    <style>
        body{
            font-size:12px;
            overflow-y:hidden;
        }
        input{
            width:100px;            
        }
        select{
            width:104px;
        }
        #sec{
            /*border:1px solid #0094ff;*/
            width:1000px;
            
        }
        #sec td{
            width:100px;
            height:20px;
            text-align:right
        }
    </style>
</head>
<body >


    <div>
        <table id="sec"  >
            <tr>
                <td>开始时间:</td>
                <td><input id="CreationTime" class="easyui-datebox" type="datetime"></td>
                <td>结束时间:</td>
                <td><input id="EndTime" class="easyui-datebox" type="datetime"></td>
                <td>收件人:</td>
                <td><input type="text" class="easyui-textbox" id="ReceiveName" name="ReceiveName" value=" " /></td>
                <td>代填人:</td>
                <td><input type="text" class="easyui-textbox" id="ReplaceUser" name="ReplaceUser" value=" " /></td>
                
                               
            </tr>
            <tr>
                <td>快递单号:</td>
                <td><input type="text" class="easyui-textbox" id="FedexNo" name="FedexNo" value="" /></td>
                <td>申请单号:</td>
                <td><input type="text" class="easyui-textbox" id="Name" name="Name" value=" " /></td>                            
                <td>国&nbsp;际:</td>
                <td>
                    <select name="FedexArea" class="easyui-combobox" id="FedexArea">
                        <option>请选择</option>
                        <option value="1">美国</option>
                        <option value="2">加拿大</option>
                    </select>
                </td>
                <td>国&nbsp;内:</td>
                <td>
                    <select name="FedexArea1" class="easyui-combobox" id="FedexArea1">
                        <option>请选择</option>
                        <option value="北京">北京</option>
                        <option value="上海">上海</option>
                    </select>
                </td>                                
            </tr>
            <tr>
                <td>快递状态:</td>
                <td>
                    <select name="FedexSatu" class="easyui-combobox" id="FedexSatu">
                        <option>请选择</option>
                        <option value="1">待审批</option>
                        <option value="2">已审批</option>
                        <option value="3">已发送</option>
                        <option value="4">待修改</option>
                    </select>
                </td>
                <td>快递类型:</td>
                <td>
                    <select name="FedexType" class="easyui-combobox" id="FedexType">
                        <option>请选择</option>
                        <option value="1">文件</option>
                        <option value="2">物品</option>
                    </select>
                </td>
                <td>
                    <span><input type="checkbox" name="" id="c1" style="width:30px;" /><label for="c1">隐藏</label></span>
                </td>
                <td>
                    <span><input type="checkbox" name="" id="c2" style="width:30px;"/><label style="width:30px;" for="c2">代填</label></span>
                </td>
                <td>
                    <a href="javascript:void(0)" id="btnSerach" class="easyui-linkbutton c1" style="width:70px">查询</a>
                </td>
            </tr>
        </table>
    </div>
    <table id="date" >        
    </table>
</body>
</html>
